﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;
using wAppStoreWebAPI.wClasses;

namespace wStore.Model
{
  public class wAppStoreItem : wApp
  {
    public wAppStoreItem(wApp waItem)
    {
      wApp = waItem;
    }
    public wApp wApp { get; private set; }

    RelayCommand tryItCommand;
    public ICommand TryItCommand
    {
      get
      {
        if (tryItCommand == null)
        {
          tryItCommand = new RelayCommand(param => TryIt()); //, param => this.CanSave);
        } 
        return tryItCommand;
      }
    }
    private void TryIt()
    {
      MessageBox.Show("Try it " + wApp.Name);
    }

    RelayCommand likeItCommand;
    public ICommand LikeItCommand
    {
      get
      {
        if (likeItCommand == null)
        {
          likeItCommand = new RelayCommand(param => LikeIt()); //, param => this.CanSave);
        }
        return likeItCommand;
      }
    }
    private void LikeIt()
    {
      MessageBox.Show("Like it " + wApp.Name);
    }

    RelayCommand shareItCommand;
    public ICommand ShareItCommand
    {
      get
      {
        if (shareItCommand == null)
        {
          shareItCommand = new RelayCommand(param => ShareIt()); //, param => this.CanSave);
        }
        return shareItCommand;
      }
    }
    private void ShareIt()
    {
      MessageBox.Show("Share it " + wApp.Name);
    }

  }
}
